Help > Reference > Macros > Document object > Export method

Export method

Calling this method will save the document content to a file.

Member of

Document

Type

Function(Destination)

Parameters

Return

The example below will save the first document from the current search results into a file, specified by the user.

Example

FileName = SaveDialog("output.txt", "Text Files (*.txt)|*.txt")
If  FileName <> "" Then
  If App.ActiveTab.Item(0).Export(FileName) Then
    MsgBox "Successful"
  Else
    MsgBox "Failed to export the document"
  End If
End If

See Also

Macro Object Model

Document